<%@ page language="java"  pageEncoding="utf-8" %>
<%@page import="entitybean.oc_user_name.EntityBeanOc_User_Name;"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String Ocean_Login=(String)request.getSession().getAttribute("Ocean_Login");
EntityBeanOc_User_Name Ocean_User=new EntityBeanOc_User_Name();
String id="0";
Ocean_User=(EntityBeanOc_User_Name)request.getSession().getAttribute("Ocean_User");
if(Ocean_User!=null)
{
	id=Ocean_User.getId().toString();
}
System.out.println("id="+id);

if (Ocean_Login==null||id.equals("0"))
{
	System.out.println("在无会话变量的情况下试图访问网页");
	response.sendRedirect(basePath);
}

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
   <title>【北极海洋生态系统信息共享平台欢迎您】</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath()%>/css/css_style.css">
			<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath()%>/css/table_css.css">
		<script language="javascript">
		function switch_page(id)
		{
			if(id==5)
			{
				var obj=window.confirm("确认要退出系统吗?");
				if(obj==true)
				{
					document.getElementById("form1").action="<%=request.getContextPath()%>/quit.do?method=quit";
					document.getElementById("form1").submit();
				}
			}
			else if(id==1)
			{	
				var id=document.getElementById("username").value;	
				var obj="";
				var url="<%=request.getContextPath()%>/edit_oc_username_form.do?method=edit_username";
				//window.showModalDialog(url,obj,"dialogWidth=300px;dialogHeight=200px");
				window.showModalDialog(url+"&v="+Math.random()+"&username_id="+id,obj,"dialogWidth=300px;dialogHeight=200px");
				//document.getElementById("form1").action="<%=request.getContextPath()%>/edit_oc_username_form.do?method=edit_username";
				//document.getElementById("form1").submit();
			}
			}
		</script>
  </head>
  
  <body>
  <table width="800" border="0" align="center" cellpadding="1" cellspacing="1">
  <tr></tr>
  <tr>
    <td height="75"><form name="form1" method="post" action="">
      <table width="500" border="0" align="right" cellpadding="1" cellspacing="1">
        <tr>
          <td width="100" height="30"><input type="button" name="button" id="button" value="帐户管理" class="btn_2k3_100" onClick="switch_page(1)"></td>
          <td width="100"><input type="button" name="button2" id="button2" value="数据库管理" class="btn_2k3_100" onClick="switch_page(2)"></td>
          <td width="100"><input type="button" name="button3" id="button3" value="新闻中心" class="btn_2k3_100" onClick="switch_page(3)"></td>
          <td width="100"><input type="button" name="button4" id="button4" value="评价指南" class="btn_2k3_100" onClick="switch_page(4)"></td>
          <td width="100"><input type="button" name="button5" id="button5" value="退出系统" class="btn_2k3_100" onClick="switch_page(5)">
          <input type="hidden" name="username" id="username" value="<%=id%>">
          </td>
        </tr>
      </table>
    </form></td>
  </tr>
  <tr>
    <td height="250" align="center">动态的图片跳转</td>
  </tr>
  <tr>
    <td height="300" align="center" valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="1">
      <tr>
        <td>新闻中心</td>
      </tr>
      <tr>
        <td height="100">&nbsp;</td>
      </tr>
    </table>
      <hr>
      <table width="100%" border="0" cellspacing="1" cellpadding="1">
        <tr>
          <td width="200" height="200" align="center">海洋生态数据</td>
          <td width="200" height="200" align="center">浮游生物数据</td>
          <td width="200" height="200" align="center">底栖生物数据</td>
          <td width="200" height="200" align="center">海洋环境数据</td>
        </tr>
      </table>
      <hr></td>
  </tr>
  </table>
  </body>
</html>
